package com.smedi.ismedi.inmail.api.feign;

import com.smedi.ismedi.inmail.api.dto.request.LoginLogLoginRequest;
import com.smedi.ismedi.inmail.api.dto.request.LoginLogLogoutRequest;
import com.smedi.ismedi.inmail.api.dto.request.LoginLogPageRequest;
import com.smedi.ismedi.inmail.api.dto.response.LoginLogResponse;
import com.smedi.ismedi.web.starter.common.PaginationData;
import com.smedi.ismedi.web.starter.common.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author u
 */
@FeignClient(name = "ismedi-inmail" )
@Api(value = "登录日志" , tags = {"登录日志"})
@RequestMapping(value = "/api/v1/login-log" )
public interface RemoteLoginLogFeignApi {
    /**
     * 登录日志-登录
     *
     * @param loginLogLoginRequest 登录日志 登录 请求
     * @return ResponseData<AnnouncementResponse>
     */
    @ApiOperation(httpMethod = "POST" , value = "登录日志-登录" )
    @PostMapping(value = "/login" )
    ResponseData<Long> login(@Validated @RequestBody LoginLogLoginRequest loginLogLoginRequest);

    /**
     * 登录日志-登出
     *
     * @param loginLogLogoutRequest 登录日志 登出 请求
     * @return ResponseData<AnnouncementResponse>
     */
    @ApiOperation(httpMethod = "POST" , value = "登录日志-登出" )
    @PostMapping(value = "/logout" )
    ResponseData<Boolean> logout(@Validated @RequestBody LoginLogLogoutRequest loginLogLogoutRequest);

    /**
     * 登录日志-分页
     *
     * @param loginLogPageRequest 登录日志 分页 请求
     * @return ResponseData<AnnouncementResponse>
     */
    @ApiOperation(httpMethod = "POST" , value = "登录日志-分页" )
    @PostMapping(value = "/page" )
    ResponseData<PaginationData<LoginLogResponse>> page(@Validated @RequestBody LoginLogPageRequest loginLogPageRequest);
}
